<!doctype html>
<html>
<head>
    <include file="public/head"/>
    <include file="public/scripts"/>
    <title>ThinkCMF插件演示首页</title>
    <meta name="description" content="ThinkCMF插件演示首页">
    <meta name="keywords" content="ThinkCMF插件演示首页">
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:cmf_plugin_url('Banner://AdminIndex/index')}">轮播演示</a></li>
        <li class="active"><a href="">编辑轮播</a></li>
    </ul>
    <form action="{:cmf_plugin_url('Banner://AdminIndex/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">
                    <tr>
                        <th width="100">标题</th>
                        <td>
                            <input class="form-control" type="" value="{$banner['title']}" name="post[title]"
                                  placeholder="请输入标题" required />
                        </td>
                    </tr>
                    <input type="hidden" name="post[id]" value="{$banner.id}">
                    <tr>
                        <th width="100">状态</th>
                        <td>
                           <select class="form-control valid" name="post[status]">
                               <option value="0" {$banner.status =="0"?'selected':''}>显示</option>
                               <option value="1" {$banner.status =="1"?'selected':''}>不显示</option>
                           </select>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">类型</th>
                        <td>
                            <select class="form-control valid" name="post[type]">
                                <option value="1" {$banner.type =="1"?'selected':''}>网页</option>
                                <option value="2" {$banner.type =="2"?'selected':''}>手机</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">排序</th>
                        <td>
                            <input class="form-control" type="number" value="{$banner.order}" name="post[order]"
                                   placeholder="请输入排序" min="0"/>
                        </td>
                    </tr>
                  <tr>
                        <th>图片</th>
                        <td>
                            <input type="hidden" name="post[url]" class="form-control" value="{$banner.url}" id="js-image-input">

                                <a href="javascript:uploadOneImage('图片上传','#js-image-input');">
                                    <img src="{:cmf_get_image_url($banner.url)}" id="js-image-input-preview" width="135" style="cursor: pointer">
                                </a>
                        </td>
                    </tr>
                </table>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary ">保存</button>
                       <a class="btn btn-default" href="{:cmf_plugin_url('Banner://AdminIndex/index')}">返回</a>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>